package com.ws.lv.service.impl;

import com.ws.lv.bean.Theme;
import com.ws.lv.mapper.ThemeMapper;
import com.ws.lv.service.ThemeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class ThemeServiceImpl implements ThemeService {
    @Autowired
    ThemeMapper themeMapper;

    @Override
    public List<Theme> selectThemeAll() {
        return themeMapper.selectThemeAll();
    }

    @Override
    public List<Theme> selectThemeByTerm(String theme_name, Integer theme_state, String theme_order) {
        return themeMapper.selectThemeByTerm(theme_name, theme_state, theme_order);
    }

    @Override
    public int insertTheme(Theme theme) {
        return themeMapper.insertTheme(theme);
    }

    @Override
    public int updateThemeDisplay(int theme_id) {
        return themeMapper.updateThemeDisplay(theme_id);
    }

    @Override
    public int updateThemeHide(int theme_id) {
        return themeMapper.updateThemeHide(theme_id);
    }

    @Override
    public Theme selectThemeById(int theme_id) {
        return themeMapper.selectThemeById(theme_id);
    }

    @Override
    public int updateTheme(Theme theme) {
        return themeMapper.updateTheme(theme);
    }

    @Override
    public int deleteThemes(ArrayList<Integer> theme_ids) {
        return themeMapper.deleteThemes(theme_ids);
    }

    @Override
    public List<Theme> selectThemeByStates() {
        return themeMapper.selectThemeByStates();
    }

}
